﻿using Microsoft.Practices.Unity.InterceptionExtension;
using TSharp.Core.Mvc.MvcCaptcha;

namespace TSharp.Core.Service
{
    /// <summary>
    /// 服务注册
    /// <para>2010/8/4</para>
    /// 	<para>TANGJINGBO</para>
    /// 	<para>tangjingbo</para>
    /// </summary>
    public partial class ServiceInterception : Interception
    {
        /// <summary>
        /// Initial the container with this extension's functionality.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();
            Registered(Container);
        }


        /// <summary>
        /// Removes the extension's functions from the container.
        /// </summary>
        /// <remarks>
        /// 	<para>
        /// This method is called when extensions are being removed from the container. It can be
        /// used to do things like disconnect event handlers or clean up member state. You do not
        /// need to remove strategies or policies here; the container will do that automatically.
        /// </para>
        /// 	<para>
        /// The default implementation of this method does nothing.</para>
        /// </remarks>
        public override void Remove()
        {
            base.Remove();
            Remove(this.Container);
        }
        private void Registered(Microsoft.Practices.Unity.IUnityContainer container)
        {
            container.RegisterType<ICaptchaImageService, DefaultCaptchaImageService>();
        
        }
        private void Remove(Microsoft.Practices.Unity.IUnityContainer container)
        {

        }
    }
}
